<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32 HTTPS Server: httpsserver::HTTPBodyParser Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP32 HTTPS Server
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classhttpsserver_1_1HTTPBodyParser.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classhttpsserver_1_1HTTPBodyParser-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">httpsserver::HTTPBodyParser Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="HTTPBodyParser_8hpp_source.html">HTTPBodyParser.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for httpsserver::HTTPBodyParser:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPBodyParser__inherit__graph.png" border="0" usemap="#httpsserver_1_1HTTPBodyParser_inherit__map" alt="Inheritance graph"/></div>
<map name="httpsserver_1_1HTTPBodyParser_inherit__map" id="httpsserver_1_1HTTPBodyParser_inherit__map">
<area shape="rect" id="node2" href="classhttpsserver_1_1HTTPMultipartBodyParser.html" title="httpsserver::HTTPMultipart\lBodyParser" alt="" coords="5,80,185,121"/>
<area shape="rect" id="node3" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html" title="httpsserver::HTTPURLEncoded\lBodyParser" alt="" coords="210,80,418,121"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for httpsserver::HTTPBodyParser:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPBodyParser__coll__graph.png" border="0" usemap="#httpsserver_1_1HTTPBodyParser_coll__map" alt="Collaboration graph"/></div>
<map name="httpsserver_1_1HTTPBodyParser_coll__map" id="httpsserver_1_1HTTPBodyParser_coll__map">
<area shape="rect" id="node2" href="classhttpsserver_1_1HTTPRequest.html" title="Represents the request stream for an HTTP request. " alt="" coords="15,5,194,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abb44c46fe8f00f6df110f76f9ada774f"><td class="memItemLeft" align="right" valign="top"><a id="abb44c46fe8f00f6df110f76f9ada774f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>HTTPBodyParser</b> (<a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> *req)</td></tr>
<tr class="separator:abb44c46fe8f00f6df110f76f9ada774f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47c2b28f720966b386ed00234940d421"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a47c2b28f720966b386ed00234940d421">nextField</a> ()=0</td></tr>
<tr class="separator:a47c2b28f720966b386ed00234940d421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7da91747462ac94a57e5d690c6c4793c"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a7da91747462ac94a57e5d690c6c4793c">getFieldName</a> ()=0</td></tr>
<tr class="separator:a7da91747462ac94a57e5d690c6c4793c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99cbbb46113e578f81964c15a8af1002"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a99cbbb46113e578f81964c15a8af1002">getFieldFilename</a> ()=0</td></tr>
<tr class="separator:a99cbbb46113e578f81964c15a8af1002"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cfd999240dacfea2c4f98161b2553ec"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a3cfd999240dacfea2c4f98161b2553ec">getFieldMimeType</a> ()=0</td></tr>
<tr class="separator:a3cfd999240dacfea2c4f98161b2553ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a968d4dc0644929a491d1ca1fcc8d48de"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a968d4dc0644929a491d1ca1fcc8d48de">read</a> (byte *buffer, size_t bufferSize)=0</td></tr>
<tr class="separator:a968d4dc0644929a491d1ca1fcc8d48de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad59e73f15316544265b95cf50141d2be"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#ad59e73f15316544265b95cf50141d2be">endOfField</a> ()=0</td></tr>
<tr class="separator:ad59e73f15316544265b95cf50141d2be"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa8a7cf15c1239dbaa8d9678df1745af5"><td class="memItemLeft" align="right" valign="top"><a id="aa8a7cf15c1239dbaa8d9678df1745af5"></a>
const size_t&#160;</td><td class="memItemRight" valign="bottom"><b>unknownLength</b> = 0x7ffffffe</td></tr>
<tr class="separator:aa8a7cf15c1239dbaa8d9678df1745af5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a538423cc74c807d939365b68ac7f4857"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a538423cc74c807d939365b68ac7f4857">_request</a></td></tr>
<tr class="separator:a538423cc74c807d939365b68ac7f4857"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Superclass for various body parser implementations that can be used to interpret http-specific bodies (like x-www-form-urlencoded or multipart/form-data)</p>
<p>To allow for arbitrary body length, the interface of the body parser provides access to one underlying "field" at a time. A field may be a value of the urlencoded string or a part of a multipart message.</p>
<p>Using next() proceeds to the next field. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ad59e73f15316544265b95cf50141d2be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad59e73f15316544265b95cf50141d2be">&#9670;&nbsp;</a></span>endOfField()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool httpsserver::HTTPBodyParser::endOfField </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns true when all field data has been read </p>

<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#ada05c171ed398accbdfc50793043d79c">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#af640e2a45d491b01e43f66cd00dd58ea">httpsserver::HTTPMultipartBodyParser</a>.</p>

</div>
</div>
<a id="a99cbbb46113e578f81964c15a8af1002"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99cbbb46113e578f81964c15a8af1002">&#9670;&nbsp;</a></span>getFieldFilename()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string httpsserver::HTTPBodyParser::getFieldFilename </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the filename of the current field or an empty string </p>

<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#a41e573d24c77853a804c5f378c6decb9">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#a2fc0fd2ddc5c2af0799ae7c561517961">httpsserver::HTTPMultipartBodyParser</a>.</p>

</div>
</div>
<a id="a3cfd999240dacfea2c4f98161b2553ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cfd999240dacfea2c4f98161b2553ec">&#9670;&nbsp;</a></span>getFieldMimeType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string httpsserver::HTTPBodyParser::getFieldMimeType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the mime type of the current field.</p>
<p>Note: This value is set by the client. It can be altered maliciously. Do NOT rely on it for anything that affects the security of your device or other clients connected to it!</p>
<p>Not every BodyParser might provide this value, usually it's set to something like text/plain then </p>

<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#a1b7edb73897a73e8ccafa0096852ce05">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#adc5c75da33b428354a571c4bd86842e1">httpsserver::HTTPMultipartBodyParser</a>.</p>

</div>
</div>
<a id="a7da91747462ac94a57e5d690c6c4793c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7da91747462ac94a57e5d690c6c4793c">&#9670;&nbsp;</a></span>getFieldName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string httpsserver::HTTPBodyParser::getFieldName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the name of the current field </p>

<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#aaded9841fba14ad5757bc392fc1cec0f">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#ac179aa69d6c32243846a42a4c04f8c1f">httpsserver::HTTPMultipartBodyParser</a>.</p>

</div>
</div>
<a id="a47c2b28f720966b386ed00234940d421"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47c2b28f720966b386ed00234940d421">&#9670;&nbsp;</a></span>nextField()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool httpsserver::HTTPBodyParser::nextField </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Proceeds to the next field of the body</p>
<p>If a field has not been read completely, the remaining content is discarded.</p>
<p>Returns true iff proceeding to the next field succeeded (ie there was a next field) </p>

<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#a8de6cf2c67585ebb5c8e5b4129f4b795">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#afd127048316aafa15fdc5d084f422346">httpsserver::HTTPMultipartBodyParser</a>.</p>

</div>
</div>
<a id="a968d4dc0644929a491d1ca1fcc8d48de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a968d4dc0644929a491d1ca1fcc8d48de">&#9670;&nbsp;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t httpsserver::HTTPBodyParser::read </td>
          <td>(</td>
          <td class="paramtype">byte *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufferSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reads a maximum of bufferSize bytes into buffer and returns the actual amount of bytes that have been read </p>

<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#a2cf57c6d67f3db25922f95fa455ca5a6">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#a8157a5f0e17ff4f09062fc8ce50e66d2">httpsserver::HTTPMultipartBodyParser</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a538423cc74c807d939365b68ac7f4857"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a538423cc74c807d939365b68ac7f4857">&#9670;&nbsp;</a></span>_request</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a>* httpsserver::HTTPBodyParser::_request</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The underlying request </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/<a class="el" href="HTTPBodyParser_8hpp_source.html">HTTPBodyParser.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacehttpsserver.html">httpsserver</a></li><li class="navelem"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html">HTTPBodyParser</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
